package org.alis.smallcc.designpatterns.behavior.proxy.aop;


public class Context {

	private final Runnable beforeRun;
	private final Runnable afterRun;

	public Context(Runnable beforeRun, Runnable afterRun) {
		this.beforeRun = beforeRun;
		this.afterRun = afterRun;
	}


	public <T> T getProxy(Object obj) {
		return AopFactory.instance(obj,beforeRun,afterRun);
	}
	public Object getProxyT(Object obj) {
		return AopFactory.instanceT(obj, beforeRun, afterRun);
	}
}
